home *** CD-ROM | disk | FTP | other *** search
-
- include ccsdef.h
-
- public isccdos,chkos
-
- datas segment para public 'datas'
- isccdos db ?
- datas ends
-
- code segment para public 'code'
- assume cs:code,ds:datas
-
- ; chkos --- check which operating system is running, MS-DOS or CC-DOS. [zqf]
- ; Return: 0 --- MS-DOS
- ; 1 --- CC-DOS
- ; All registers are reserved. June 19,1990
- chkos proc near
- push ax
- push bx
- push ds
- push es
- mov ax,datas
- mov ds,ax
- mov ax ,0000h
- mov es, ax
-
- mov bx, 43h
- mov al, es:[bx]
- cmp al, 0a0h ;check if Segment of vector of INT10H >=0Axxxh?
- jae next ; ae = Yes (non CCDOS)
-
- mov bx, 5bh
- mov al, es:[bx]
- cmp al, 0a0h ;check if Segment of vector of INT16H >=0Axxxh?
- jae next ; ae = Yes (non CCDOS)
-
- mov isccdos ,01h ; current state is CCDOS
- jmp next1
- next:
- mov isccdos ,00h ; current state is MSDOS
- next1:pop es
- pop ds
- pop bx
- pop ax
- ret
- chkos endp
-
- code ends
- end
-
-